package com.letoken.platform.repo.mall.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户商城消费发型记录
 * </p>
 *
 * @author 作者
 * @since 2023-04-20
 */
@Getter
@Setter
@TableName("app_mall_issue_record")
@ApiModel(value = "AppMallIssueRecord对象", description = "用户商城消费发型记录")
public class AppMallIssueRecord extends Model<AppMallIssueRecord> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("商城订单id")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("发行数量")
    @TableField("issue_amount")
    private BigDecimal issueAmount;

    @ApiModelProperty("消费/让利发行数量")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("待流通")
    @TableField("wait_circulation")
    private BigDecimal waitCirculation;

    @ApiModelProperty("已流通")
    @TableField("circulation")
    private BigDecimal circulation;

    @ApiModelProperty("流通总量")
    @TableField("total_circulation")
    private BigDecimal totalCirculation;

    @ApiModelProperty("流通状态（0流通未结束，1流通已结束）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("0.消费发行 1。让利发行")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("发行时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("流通周期")
    @TableField("circulate_round")
    private Integer circulateRound;

    @ApiModelProperty("1.商户 2.商家")
    @TableField("issue_type")
    private Integer issueType;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
